package com.zx.pm.service.impl;

import java.util.List;
import com.zx.common.utils.DateUtils;
import com.zx.pm.domain.PurchaseProject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zx.pm.mapper.PurchaseProjectMapper;
import com.zx.pm.service.IPurchaseProjectService;


@Service
public class PurchaseProjectServiceImpl implements IPurchaseProjectService {

    @Autowired
    private PurchaseProjectMapper purchaseProjectMapper;


    @Override
    public PurchaseProject selectPurchaseProjectById(Long id) {
        return purchaseProjectMapper.selectPurchaseProjectById(id);
    }


    @Override
    public List<PurchaseProject> selectPurchaseProjectList(PurchaseProject purchaseProject) {
        return purchaseProjectMapper.selectPurchaseProjectList(purchaseProject);
    }


    @Override
    public int insertPurchaseProject(PurchaseProject purchaseProject) {
        purchaseProject.setCreateTime(DateUtils.getNowDate());
        return purchaseProjectMapper.insertPurchaseProject(purchaseProject);
    }


    @Override
    public int updatePurchaseProject(PurchaseProject purchaseProject) {
        purchaseProject.setUpdateTime(DateUtils.getNowDate());
        return purchaseProjectMapper.updatePurchaseProject(purchaseProject);
    }


    @Override
    public int deletePurchaseProjectByIds(Long[] ids) {
        return purchaseProjectMapper.deletePurchaseProjectByIds(ids);
    }


    @Override
    public int deletePurchaseProjectById(Long id) {
        return purchaseProjectMapper.deletePurchaseProjectById(id);
    }
}
